package com.qriver.modules;

import java.util.Arrays;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.filter.reactive.HiddenHttpMethodFilter;
import org.springframework.web.server.ServerWebExchange;
import org.springframework.web.server.WebFilterChain;

import com.qriver.auth.client2.EnableAceAuthClient;
import com.qriver.modules.filter.AccessGlobalFilter;

import reactor.core.publisher.Mono;

/**
 *    网关路由
 * @author hsh
 *
 */
@SpringBootApplication
@EnableFeignClients
public class GatewayApplication {
	
	
	public static void main(String[] args) {
		SpringApplication.run(GatewayApplication.class, args);
	}
	
	@Bean 
	public AccessGlobalFilter tokenFilter(){
		return new AccessGlobalFilter(); 
	}
	 
	/*
	 * @Bean public HiddenHttpMethodFilter hiddenHttpMethodFilter() { return new
	 * HiddenHttpMethodFilter() {
	 * 
	 * @Override public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain
	 * chain) { return chain.filter(exchange); } }; }
	 */
	
}
